<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" />
<title>코오롱</title>
<link rel="stylesheet" type="text/css" href="${requestScope.contextPath}/css/import.css" />
<script type="text/javascript" src="${requestScope.contextPath}/js/jquery-ui-1.8.14.custom/js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="${requestScope.contextPath}/js/jquery-ui-1.8.14.custom/js/jquery-ui-1.8.14.custom.min.js"></script>
<script type="text/javascript" src="${requestScope.contextPath}/js/common.js"></script>
<c:set var="userAgent" value="${header['User-Agent']}" />
<fmt:setBundle basename="com.kolon.config.properties.config" var="config" />
<c:if test="${fn:indexOf(userAgent, 'Android') != -1}"><c:set var="platForm" value="Android" /></c:if>
<c:if test="${fn:indexOf(userAgent, 'iPhone') != -1}"><c:set var="platForm" value="iPhone" /></c:if>
<script type="text/javascript">
function appBack() {
	document.location.href='${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskProcessList.do?Status=${Status}&page=${page}&endY=${param.endY}';
}
</script>
<link rel="stylesheet" type="text/css" href="${requestScope.contextPath}/js/jquery-ui-1.8.14.custom/css/ui-lightness/jquery-ui-1.8.14.custom.css" />

<script type="text/javascript">
$(function() {
	var dates = $('#realinopen_date').datepicker({
		showOn: "button",
		buttonImage: "${requestScope.contextPath}/images/reservation/cal1.gif",
		buttonImageOnly: true,
		numberOfMonths: 1,
		dateFormat: 'yy-mm-dd',
		showMonthAfterYear:true,
		showButtonPanel: true,
		monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
		dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
		onSelect: function(selectedDate) {
			var option = this.id == "startdate" ? "minDate" : "maxDate";
			var instance = $(this).data("datepicker");
			var date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings);
			dates.not(this).datepicker("option", option, date);
		}
	});
});
$(function() {
	var dates = $('#realinclose_date').datepicker({
		showOn: "button",
		buttonImage: "${requestScope.contextPath}/images/reservation/cal1.gif",
		buttonImageOnly: true,
		numberOfMonths: 1,
		dateFormat: 'yy-mm-dd',
		showMonthAfterYear:true,
		showButtonPanel: true,
		monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
		dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
		onSelect: function(selectedDate) {
			var option = this.id == "startdate" ? "minDate" : "maxDate";
			var instance = $(this).data("datepicker");
			var date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings);
			dates.not(this).datepicker("option", option, date);
		}
	});
});

// 상세분류
function fnSymptom(rSymptom){
	
	$.ajax({
		url: '${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskProcessCat2.do',
		type:'POST',
		data: {
			'Cate1': rSymptom
			,'cr_type': '${CrType}'
		},
		dataType:'json',
		success: function(json){
			
			var select_Obj = document.getElementById('symptom');
			select_Obj.options.length = 0;
			
				$('#symptom').append('<option value="">상세분류 선택</option>');
			
			for (i=0,cnt=json.list.length; i<cnt; i++) {
				obj = json.list[i];
				$('#symptom').append('<option value='+obj.SYMT_CODE+'>'+obj.SYMT_DESC+'</option>');
			}
			
		},
		error: function(){
			//alert('error');
		}
	});
}
//요청역역(회사 코드로 구하기)
function searchJobArea(nCompany){
	
	$.ajax({
		url: '${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskProcessCompany.do',
		type:'POST',
		data: {
			'Company': nCompany
		},
		dataType:'json',
		success: function(json){
			
			var select_Obj = document.getElementById('cr_pccode');
			select_Obj.options.length = 0;
			
				$('#cr_pccode').append('<option value="">요청영역 선택</option>');
			
			for (i=0,cnt=json.list.length; i<cnt; i++) {
				obj = json.list[i];
				$('#cr_pccode').append('<option value='+obj.PC_CODE+ '/'+obj.PC_PRIORITY+'>'+obj.PC_NAME+'</option>');
			}
			
		},
		error: function(){
			//alert('error');
		}
	});
}

//offering이 변경되면 목표처리,우선순위 초기화
function fnChangeOffering(priority){
	var cr_type = "${CrType}";
	
	if(cr_type == "I"){
	
		if(priority == ""){
			alert("요청영역을 선택하세요.");
			document.form.priority.value="0";	
			return false;
		}
		var priority = priority.split("/")[1];
		document.form.priority.value=priority;	
		document.form.impact[0].selected = true;	
		document.form.goaldotime.value = "";
	}
}

//처리자 구하기
function fnassignee(nassDept){
	
	$.ajax({
		url: '${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskProcessAssDept.do',
		type:'POST',
		data: {
			'AssDept': nassDept
		},
		dataType:'json',
		success: function(json){
			
			var select_Obj = document.getElementById('ass_id');
			select_Obj.options.length = 0;
			
				$('#ass_id').append('<option value="">처리자 선택</option>');
			
			for (i=0,cnt=json.list.length; i<cnt; i++) {
				obj = json.list[i];
				$('#ass_id').append('<option value='+obj.ID+'>'+obj.NAME+'</option>');
			}
			
		},
		error: function(){
			//alert('error');
		}
	});
}

function goSubmit() {
	var cr_type = "${CrType}";
	var statCD = $('#stat_code option:selected').val();
	// 인시던트 인 경우
	if (cr_type == 'I') {
		// 신규, 접수, 진행
		if (statCD == 'OP' || statCD == 'ACK' || statCD == 'WIP') {
			if (document.form.impact.value=="") {
				alert("비즈니스영향도가 선택되지 않았습니다!");
				document.form.impact.focus();
				return false;
			}
		// 취소
		} else if (statCD == 'CANCEL') {
			if (document.form.dodetail.value=="") {
				alert("조치내역에 취소사유를 입력해 주세요!");
				document.form.dodetail.focus();
				return false;
			}
		// 종료
		} else if (statCD == 'CL') {
			if(document.form.symt_code1.value=="" || document.form.symt_code.value==""){
				alert("상세분류를 선택하세요!");
				return false;
			}
			if (document.form.impact.value=="") {
				alert("비즈니스영향도가 선택되지 않았습니다!");
				document.form.impact.focus();
				return false;
			}
			if (document.form.rootcause.value=="") {
				alert("RootCause를 입력하세요!");
				document.form.rootcause.focus();
				return false;
			}
			if (document.form.realinopen_date.value=="") {
				alert("실 장애 발생시간을 입력하세요!");
				document.form.realinopen_date.focus();
				return false;
			}
			if (document.form.realinclose_date.value=="") {
				alert("실 장애 처리시간을 입력하세요!");
				document.form.realinclose_date.focus();
				return false;
			}
			if (document.form.incicause.value=="") {
				alert("장애원인을 입력하세요!");
				document.form.incicause.focus();
				return false;
			}
			if (document.form.dodetail.value=="") {
				alert("조치내역을 입력하세요!");
				document.form.dodetail.focus();
				return false;
			}
		}
		
	// 리퀘스트 인 경우
	} else {
		// 취소
		if (statCD == 'CANCEL') {
			if (document.form.dodetail.value=="") {
				alert("처리내역을 입력하세요!");
				document.form.dodetail.focus();
				return false;
			}
		// 종료
		} else if (statCD == 'CL') {
			if(document.form.symt_code1.value=="" || document.form.symt_code.value==""){
				alert("상세분류를 선택하세요!");
				return false;
			}
			if (document.form.dodetail.value=="") {
				alert("처리내역을 입력하세요!");
				document.form.dodetail.focus();
				return false;
			}
		}
	}
	if (confirm('저장하시겠습니까?')) {
		return true;
	}
	return false;
}

//비즈니스영향도(*) 우선순위 장애등급 목표처리시간(일시) 
function chgImpact()
{
	if (document.form.priority.value=="1")
	{
		if (document.form.impact.value=="1")
		{
			document.form.goaldotime.value = "2";
		}
		else if (document.form.impact.value=="2")
		{
			document.form.goaldotime.value = "2";
		}
		else if (document.form.impact.value=="3")
		{
			document.form.goaldotime.value = "4";
		}
		else
		{
			document.form.goaldotime.value = "0";
		}
	}
	else if (document.form.priority.value=="2")
	{
		if (document.form.impact.value=="1")
		{
			document.form.goaldotime.value = "2";
		}
		else if (document.form.impact.value=="2")
		{
			document.form.goaldotime.value = "4";
		}
		else if (document.form.impact.value=="3")
		{
			document.form.goaldotime.value = "4";
		}
		else
		{
			document.form.z_inlevel.value = "0";
			document.form.goaldotime.value = "0";
		}
	}
	else if (document.form.priority.value=="3")
	{
		if (document.form.impact.value=="1")
		{
			document.form.goaldotime.value = "4";
		}
		else if (document.form.impact.value=="2")
		{
			document.form.goaldotime.value = "4";
		}
		else if (document.form.impact.value=="3")
		{
			document.form.goaldotime.value = "12";
		}
		else
		{
			document.form.goaldotime.value = "0";
		}
	}
	else if (document.form.priority.value=="4")
	{
		if (document.form.impact.value=="1")
		{
			document.form.goaldotime.value = "4";
		}
		else if (document.form.impact.value=="2")
		{
			document.form.goaldotime.value = "12";
		}
		else if (document.form.impact.value=="3")
		{
			document.form.goaldotime.value = "60";
		}
		else
		{			
			document.form.goaldotime.value = "0";
		}
	}
}

</script>
<style>
<!--
.content h3{font-size:13px !important;}
-->
</style>
</head>
<body>
	<div id="wrap">
		<div class="header">
			<h1>SERVICE DESK</h1>
		</div><!-- // header -->
		<div class="content"><c:if test="${CrType eq 'R'}"><h3>REQUEST</h3></c:if><c:if test="${CrType eq 'I'}"><h3>INCIDENT</h3></c:if>
			<p class="list">
		<c:if test="${viewMap.STAT_CODE eq 'CL'}">
			<%// 종료일 경우 이미지만 출력 %>
			<img src="${requestScope.contextPath}/images/btn/btn_revision.gif" alt="납기조정" />
			<c:if test="${CrType eq 'R'}">
			<img src="${requestScope.contextPath}/images/btn/btn_incident.gif" alt="incident" />
			</c:if>
			<c:if test="${CrType eq 'I'}">
			<img src="${requestScope.contextPath}/images/btn/btn_request2.gif" alt="incident" />
			</c:if>
			
			<img src="${requestScope.contextPath}/images/btn/btn_notice.gif" alt="처리계획알림" />
		</c:if>
		<c:if test="${viewMap.STAT_CODE != 'CL'}">
			<%// 종료가 아닐 경우 처리 %>			
			<c:if test="${viewMap.NABGI_BTN eq 'Y'}">
			<a href="${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskDeadLine.do?Ref_Type=${Ref_Type}&Ref_Num=${viewMap.REF_NUM}&Status=${Status }&Page=${page}"><img src="${requestScope.contextPath}/images/btn/btn_revision_on.gif" alt="납기조정" /></a>
			</c:if>
			<c:if test="${viewMap.NABGI_BTN != 'Y'}">
			<img src="${requestScope.contextPath}/images/btn/btn_revision.gif" alt="납기조정" />
			</c:if>
			 
			<c:if test="${CrType eq 'R'}">
			<a href="${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskProcessView.do?Ref_Type=I&Ref_Num=${viewMap.REF_NUM}&Status=${Status }&Page=${page}"><img src="${requestScope.contextPath}/images/btn/btn_incident.gif" alt="incident" /></a>
			</c:if>
			<c:if test="${CrType eq 'I'}">
			<a href="${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskProcessView.do?Ref_Type=R&Ref_Num=${viewMap.REF_NUM}&Status=${Status }&Page=${page}"><img src="${requestScope.contextPath}/images/btn/btn_request2.gif" alt="incident" /></a>
			</c:if>
			<c:if test="${viewMap.ALERT_BTN eq 'Y'}">
			<a href="${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskNotification.do?Ref_Type=I&Ref_Num=${viewMap.REF_NUM}&Status=${Status }&Page=${page}"><img src="${requestScope.contextPath}/images/btn/btn_notice_on.gif" alt="처리계획알림" /></a>
			</c:if>
			<c:if test="${viewMap.ALERT_BTN != 'Y'}">
			<img src="${requestScope.contextPath}/images/btn/btn_notice.gif" alt="처리계획알림" />
			</c:if>
		</c:if>
			</p>
			<form name="form" action="${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskProcessView.do" method="post" onsubmit="return goSubmit();" >
			<div class="service">
				<div class="table5">
					<input type="hidden" name="MODE" value="Save" />
					<input type="hidden" name="page" value="${page}" />
					<input type="hidden" name="ref_num" value="${viewMap.REF_NUM}" />
					<input type="hidden" name="cr_type" value="${CrType}" />
					<input type="hidden" name="priority" value="${viewMap.PRIORITY}" />
					<input type="hidden" name="Status" value="${Status}" />
					<input type="hidden" name="endY" value="${param.endY}" />
					
					<table summary="" cellspacing="0" style="width:100%;">
						<caption>서비스 요청</caption>
						<colgroup>
							<col style="width:25%" />
							<col style="width:75%" />
						</colgroup>
						<tbody>
							<tr>
								<th scope="row">요청번호</th>
								<td>${viewMap.REF_NUM}</td>
							</tr>
							<tr>
								<th scope="row">요청자</th>
								<td>${viewMap.CUSTOMER_INFO}</td>
							</tr>
							<tr>
								<th scope="row">요청영역</th>
								<td>
									<p><select name="cr_company" style="width:90%;" onchange="searchJobArea(this.value)">
										<!-- <option value="">요청회사 선택</option> -->										
										<c:forEach items="${mapList2}" var="mapInfo" varStatus="status">
										<option value="${mapInfo.ZC_CODE }" <c:if test="${viewMap.CR_COMPANY eq mapInfo.ZC_CODE}">selected</c:if>>${mapInfo.ZC_NAME }</option>
										</c:forEach>
									</select>
									</p>
									
									<p><select name="cr_pccode" id="cr_pccode" style="width:90%;" onchange="fnChangeOffering(this.value)">
										<!-- <option value="">요청영역 선택</option> -->
										<c:forEach items="${mapList3}" var="mapInfo" varStatus="status">
										<option value="${mapInfo.PC_CODE }/${mapInfo.PC_PRIORITY }" <c:if test="${viewMap.CR_PCCODE eq mapInfo.PC_CODE}">selected</c:if>>${mapInfo.PC_NAME }</option>
										</c:forEach>
									</select>
									</p>
								
								</td>
							</tr>
							<tr>
								<th scope="row">요청내역</th>
								<td>${viewMap.CR_DESC}</td>
							</tr>
							<tr>
								<th scope="row">요청일</th>
								<td>${viewMap.OPEN_DATE}</td>
							</tr>
							<tr>
								<th scope="row">진행상태</th>
								<td>
									<select id="stat_code" name="stat_code" style="width:90%;">
									<c:forEach items="${mapList8}" var="mapInfo" varStatus="status">
									<option value="${mapInfo.STAT_CODE }" <c:if test="${mapInfo.STAT_CODE eq viewMap.STAT_CODE}">selected</c:if>>${mapInfo.STAT_NAME }</option>
									</c:forEach>
									</select>
								</td>
							</tr>
							<tr>
								<th scope="row">희망완료일</th>
								<td>${viewMap.PLAN_DATE}</td>
							</tr>
							<tr>
								<th scope="row">완료일</th>
								<td>${viewMap.CLOSE_DATE}&nbsp;</td>
							</tr>
							<tr>
								<th scope="row">처리자</th>
								<td>
									<p><select name="ass_depart" style="width:90%;" onchange="fnassignee(this.value)">
										<!-- <option value="">처리부서 선택</option> -->
										<c:forEach items="${mapList4}" var="mapInfo" varStatus="status">
										<option value="${mapInfo.DP_CODE }" <c:if test="${viewMap.ASS_DEPART eq mapInfo.DP_CODE}">selected</c:if>>${mapInfo.DP_NAME }</option>
										</c:forEach>
									</select></p>
									<p><select name="ass_id" id="ass_id" style="width:90%;">
										<!-- <option value="">처리자 선택</option> -->
										<c:forEach items="${mapList5}" var="mapInfo" varStatus="status">
										<option value="${mapInfo.ID }" <c:if test="${viewMap.ASS_ID eq mapInfo.ID}">selected</c:if>>${mapInfo.NAME }</option>
										</c:forEach>
									</select></p>
								</td>
							</tr>
<%
		//#################################################################################################3
		// REQUEST FORM START
		//#################################################################################################3
%>						
<c:if test="${CrType eq 'R'}">
							<tr>
								<th scope="row">상세분류</th>
								<td>
									<p><select name="symt_code1" style="width:90%;" onchange="fnSymptom(this.value)">
										<option value="">상세분류그룹선택</option>
										<c:forEach items="${mapList6}" var="mapInfo" varStatus="status">
										<option value="${mapInfo.SYMT1_DESC }" <c:if test="${viewMap.SYMT1_DESC eq mapInfo.SYMT1_DESC}">selected="selected"</c:if>>${mapInfo.SYMT1_DESC }</option>
										</c:forEach>
									</select></p>
									<p><select name="symt_code" id="symptom" style="width:90%;">
										<option value="">상세분류 선택</option>
									<c:forEach items="${mapList_}" var="mapInfo_" varStatus="status">
										<option value="${mapInfo_.SYMT_CODE}" <c:if test="${viewMap.SYMT_CODE eq mapInfo_.SYMT_CODE}">selected="selected"</c:if>>${mapInfo_.SYMT_DESC}</option>
									</c:forEach>
									</select></p>
								</td>
							</tr>
							<tr>
								<th scope="row">현재진행내역</th>
								<td>
								<c:choose>
								<c:when test="${viewMap.STAT_CODE eq 'CL'}">
									${viewMap.STAT_DESC}
								</c:when>
								<c:otherwise>
									<textarea cols="" rows="3" name="stat_desc" class="comment">${viewMap.STAT_DESC}</textarea>
								</c:otherwise>
								</c:choose>
								</td>
							</tr>
							<tr>
								<th scope="row">처리내역</th>
								<td>
								<c:choose>
								<c:when test="${viewMap.STAT_CODE eq 'CL'}">
									${viewMap.DODETAIL}
								</c:when>
								<c:otherwise>
									<textarea cols="" rows="3" name="dodetail" class="comment">${viewMap.DODETAIL}</textarea>
								</c:otherwise>
								</c:choose>
								</td>
							</tr>
							<tr>
								<th scope="row">추가의견</th>
								<td>
								<c:choose>
								<c:when test="${viewMap.STAT_CODE eq 'CL'}">
									${viewMap.OPINION}
								</c:when>
								<c:otherwise>
									<textarea cols="" rows="3" name="opinion" class="comment">${viewMap.OPINION}</textarea>
								</c:otherwise>
								</c:choose>
									
								</td>
							</tr>
</c:if>							
<%
		//#################################################################################################3
		// REQUEST FORM END
		//#################################################################################################3
%>							

<%
		//#################################################################################################3
		// INCIDENT FORM START
		//#################################################################################################3
%>				
<c:if test="${CrType eq 'I'}">
							<tr>
								<th scope="row">상세분류</th>
								<td>
									<p><select name="symt_code1" style="width:90%;" onchange="fnSymptom(this.value)">
										<option value="">상세분류그룹선택</option>
										<c:forEach items="${mapList6}" var="mapInfo" varStatus="status">
										<option value="${mapInfo.SYMT1_DESC }" <c:if test="${viewMap.SYMT1_DESC eq mapInfo.SYMT1_DESC}">selected="selected"</c:if>>${mapInfo.SYMT1_DESC }</option>
										</c:forEach>
									</select></p>
									<p><select name="symt_code" id="symptom" style="width:90%;">
										<option value="">상세분류 선택</option>
										<c:forEach items="${mapList_}" var="mapInfo_" varStatus="status">
											<option value="${mapInfo_.SYMT_CODE}" <c:if test="${viewMap.SYMT_CODE eq mapInfo_.SYMT_CODE}">selected="selected"</c:if>>${mapInfo_.SYMT_DESC}</option>
										</c:forEach>
									</select></p>
								</td>
							</tr>
							<tr>
								<th scope="row">비즈니스 영향도</th>
								<td>
									<select name="impact" onchange="chgImpact()" style="width:90%;">
										<option value="">선택하세요</option>
										<option value="1" <c:if test="${viewMap.IMPACT eq '1'}">selected</c:if>>1 High</option>
										<option value="2" <c:if test="${viewMap.IMPACT eq '2'}">selected</c:if>>2 Medium</option>
										<option value="3" <c:if test="${viewMap.IMPACT eq '3'}">selected</c:if>>3 Low</option>
									</select>
								</td>
							</tr>
							<tr>
								<th scope="row">목표처리시간</th>
								<td><input type="text" name="goaldotime" value="${viewMap.GOALDOTIME}" class="intxt5" readonly="readonly" /></td>
							</tr>
							<tr>
								<th scope="row">Root Cause</th>
								<td>
									<select name="rootcause" style="width:90%;">
										<option value="">근본원인을 선택하세요</option>
										<c:forEach items="${mapList7}" var="mapInfo" varStatus="status">
										<option value="${mapInfo.RC_CODE }" <c:if test="${viewMap.ROOTCAUSE eq mapInfo.RC_CODE}">selected</c:if>>${mapInfo.RC_DESC }</option>
										</c:forEach>
									</select>
								</td>
							</tr>
							<tr>
								<th scope="row">실 장애 발생시간</th>
								<td>
									<p><input type="text" name="realinopen_date" value="${viewMap.REALINOPEN_DATE}" id="realinopen_date" class="intxt5" readonly="readonly" /></p>
									<p>
										<select name="realinopen_hour" style="width:30%;">
											<c:forEach var = "i" begin = "1" end = "24" step = "1" varStatus = "status">
											<option value="<c:if test="${i <= 9}">0</c:if>${i}" <c:if test="${i eq viewMap.REALINOPEN_HOUR}">selected</c:if>><c:if test="${i <= 9}">0</c:if>${i}</option>										
											</c:forEach>
										</select>
										<select name="realinopen_minute" style="width:30%;">
											<c:forEach var = "i" begin = "00" end = "59" step = "1" varStatus = "status">
											<option value="<c:if test="${i < 10}">0</c:if>${i}" <c:if test="${i eq viewMap.REALINOPEN_MINUTE}">selected</c:if>><c:if test="${i < 10}">0</c:if>${i}</option>
											</c:forEach>
										</select>
									</p>
								</td>
							</tr>
							<tr>
								<th scope="row">실 장애 처리시간</th>
								<td>
									<p><input type="text" name="realinclose_date" value="${viewMap.REALINCLOSE_DATE}" id="realinclose_date" class="intxt5" readonly="readonly" /></p>
									<p>
										<select name="realinclose_hour" style="width:30%;">
											<c:forEach var = "i" begin = "1" end = "24" step = "1" varStatus = "status">										   
											<option value="<c:if test="${i <= 9}">0</c:if>${i}" <c:if test="${i eq viewMap.REALINCLOSE_HOUR}">selected</c:if>><c:if test="${i <= 9}">0</c:if>${i}</option>										
											</c:forEach>
										</select>
										<select name="realinclose_minute" style="width:30%;">
											<c:forEach var = "i" begin = "00" end = "59" step = "1" varStatus = "status">
											<option value="<c:if test="${i < 10}">0</c:if>${i}" <c:if test="${i eq viewMap.REALINCLOSE_MINUTE}">selected</c:if>><c:if test="${i < 10}">0</c:if>${i}</option>
											</c:forEach>
										</select>
									</p>
								</td>
							</tr>
							<tr>
								<th scope="row">현재진행내역</th>
								<td>
								<c:choose>
								<c:when test="${viewMap.STAT_CODE eq 'CL'}">
									${viewMap.STAT_DESC}
								</c:when>
								<c:otherwise>
									<textarea cols="" rows="3" name="stat_desc" class="comment">${viewMap.STAT_DESC }</textarea>
								</c:otherwise>
								</c:choose>
								</td>
							</tr>
							<tr>
								<th scope="row">장애원인</th>
								<td>
								<c:choose>
								<c:when test="${viewMap.STAT_CODE eq 'CL'}">
									${viewMap.INCICAUSE}
								</c:when>
								<c:otherwise>
									<textarea cols="" rows="3" name="incicause" class="comment">${viewMap.INCICAUSE }</textarea>
								</c:otherwise>
								</c:choose>
								</td>
							</tr>
							<tr>
								<th scope="row">조치내역</th>
								<td>
								<c:choose>
								<c:when test="${viewMap.STAT_CODE eq 'CL'}">
									${viewMap.DODETAIL}
								</c:when>
								<c:otherwise>
									<textarea cols="" rows="3" name="dodetail" class="comment">${viewMap.DODETAIL }</textarea>
								</c:otherwise>
								</c:choose>
								</td>
							</tr>
							<tr>
								<th scope="row">추가의견</th>
								<td>
								<c:choose>
								<c:when test="${viewMap.STAT_CODE eq 'CL'}">
									${viewMap.OPINION}
								</c:when>
								<c:otherwise>
									<textarea cols="" rows="3" name="opinion" class="comment">${viewMap.OPINION }</textarea>
								</c:otherwise>
								</c:choose>
								</td>
							</tr>

</c:if>
<%
		//#################################################################################################3
		// INCIDENT FORM END
		//#################################################################################################3
%>				
						</tbody>
					</table>
				</div>
				<div class="btn_area1">
					<c:if test="${viewMap.STAT_CODE != 'CL'}">				
					<p class="left_area1"><input type="image" src="${requestScope.contextPath}/images/btn/btn_save.gif" alt="저장" /></p>
					</c:if>
					<div class="right_area">
						<p><a href="${requestScope.contextPath}/business/mServiceDesk_/mServiceDeskProcessList.do?Status=${Status}&page=${page}&endY=${param.endY}"><img src="${requestScope.contextPath}/images/btn/btn_reset.gif" alt="취소" /></a></p>
					</div>
				</div>
				
			</div>
			</form>
		</div><!-- // content -->
	</div><!-- // wrap -->
</body>
</html>
